-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul code example guidelines #28017
Conversation
This pull request has merge conflicts that must be resolved before it can be merged. |
1 similar comment
This pull request has merge conflicts that must be resolved before it can be merged. |
files/en-us/mdn/writing_guidelines/writing_style_guide/code_examples/css/index.md
Outdated
Show resolved
Hide resolved
I find the rename from "code style guide" to "code examples" unnecessary. Is it for any tangible concerns? The "style" does not imply "formatting". |
As I mentioned above, our documentation covers more than just styling the examples, but rather also discusses writing conventions to follow, such as how to write variable names, where to place comments, etc. The CSS page is a great example of this, where it tells the writer what type of units to use, to not use resets, etc. As such, I personally find it misleading to call it the "styling" guide. |
"Code style" is not "code styling" ^^ "Code style" encompasses what syntax to use/not use and how code should be structured. For example, Airbnb style guide |
I don't really agree with returning this to the original location, but IDC anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor tweaks, two corrections, and a few suggestions for updates on text you didn't actually change
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/html/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/html/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/html/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/html/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/index.md
Outdated
Show resolved
Hide resolved
@@ -160,20 +141,20 @@ These guidelines should be followed to ensure that the code examples you write d | |||
color: rgb(248, 242, 230); | |||
``` | |||
|
|||
- If you have to use hex colors, then use lower-case: | |||
- For hex colors, use the short form where relevant: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i disagree with this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guideline has been around for a long time; I didn't add it. :P
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/index.md
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/code_style_guide/shell/index.md
Outdated
Show resolved
Hide resolved
files/en-us/mdn/writing_guidelines/writing_style_guide/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Estelle Weyl <[email protected]>
This PR overhauls the guidelines for writing code examples to better match our rules today. Namely, it performs the following: